package com.giveu.signature.common.service.impl;

import java.io.OutputStream;
import java.util.Map;

import com.giveu.signature.bean.TemplateHtmlParam;
import com.giveu.signature.common.service.GenModelService;
import com.giveu.signature.common.util.FreeMarkUtil;
import com.giveu.signature.common.util.Html2PdfUtil;



public class HtmlServiceImpl extends GenModelService {

	@Override
	public void genPdfOutputStream(OutputStream out, TemplateHtmlParam tm, Map<String, Object> map) throws Exception {
		Html2PdfUtil.html2Pdf(FreeMarkUtil.renderStr(tm.getHtml(),map), out);
	}

}
